/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package xmppbot.funcs;

import java.util.ArrayList;
import xmppbot.parse.options;

/**
 *
 * @author lian
 */
public class packetCollector {
    ArrayList<options> collector;
    
    public void addPacket (options opts) {
        collector.add(0, opts);
    }
    
    public options next () {
        options opts = null;
        if (collector.size() != 0) {
            int index = collector.size() - 1;
            opts = collector.get(index);
            collector.remove(index);
        }
        return opts;
    }
    
    public void clear () {
        collector.clear();
    }
}
